-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#087] 모든 역량 랭크를 조회하는 기능 구현 #88
Conversation
좀 수정 한게 많긴한데 공통되는 부분은 다 statRepository로 합쳤습니다~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statRepository 에서 entity 를 받고 해당 엔티티에 따라 알고리즘 순위와 개인 랭크를 반환하게 만들어서 코드 중복을 없게 만든 점 좋습니다.
사실 이에 대해서 해당 코드들이 중복인데 서로 다른 repository 에서 처리를 해야하나 아니면 상위 클래스에서 합쳐야 하나 고민을 했습니다. 결국 귀찮음도 일부 없었다는건 부정은 못하지만,,,, 아래 글을 보고 분리를 해 놓는게 좋을 수 도 있겠다 라는 생각이 들기도 했습니다. 정답은 없지만 한번 참고하면 좋을 것 같아서 공유드립니다.
아래 글에서 6. 산발적 수정 에 관련 내용이 있습니다.
https://jaehyeon48.github.io/software-architecture/refactoring-summary-3/
아 저는 그런부분 까지는 고려하지는 못했네요.. 생각지 못한 것을 짚어주셔서 감사합니다.. |
이슈
체크리스트
고민한 내용
Repository 리펙토링
findWithRank
,findIndividualRank
코드를 구현한 StatRepository를 만들고 StatRepository를 상속해서 각 Repository에서 사용하게 수정하였다.